package com.shepin.myactivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.shepin.R;
import com.shepin.base.BaseActivity;

/**
 * Created by apple on 16/7/28.
 */
public class SetttingActivity extends BaseActivity {
    private RelativeLayout layout_personaldata;
    private RelativeLayout layout_accountsafety;
    private RelativeLayout layout_messagenotify;
    private RelativeLayout layout_privacy;
    private RelativeLayout layout_aboudshepin;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.setting);
        initView();

    }

    public void initView(){
        layout_personaldata=(RelativeLayout)findViewById(R.id.layout_personaldata);
        layout_personaldata.setOnClickListener(this);
        layout_accountsafety=(RelativeLayout)findViewById(R.id.layout_accountsafety);
        layout_accountsafety.setOnClickListener(this);
        layout_messagenotify=(RelativeLayout)findViewById(R.id.layout_messagenotify);
        layout_messagenotify.setOnClickListener(this);
        layout_privacy=(RelativeLayout)findViewById(R.id.layout_privacy);
        layout_privacy.setOnClickListener(this);
        layout_aboudshepin=(RelativeLayout)findViewById(R.id.layout_aboudshepin);
        layout_aboudshepin.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        super.onClick(view);
        switch (view.getId()){
            case R.id.layout_personaldata:
                Intent personaldata=new Intent(SetttingActivity.this,SetPersonalData.class);
                startActivity(personaldata);
                break;
            case R.id.layout_accountsafety:
                Intent accountsafety=new Intent(SetttingActivity.this,SetAccountSafetyActivity.class);
                startActivity(accountsafety);
                break;
            case R.id.layout_messagenotify:
                Intent newmessagenotify=new Intent(SetttingActivity.this,SetNewMessageNotifyActivity.class);
                startActivity(newmessagenotify);
                break;
            case R.id.layout_privacy:
                Intent privacy=new Intent(SetttingActivity.this,SetPrivacyActivity.class);
                startActivity(privacy);
                break;
            case R.id.layout_aboudshepin:
                Intent about=new Intent(SetttingActivity.this,SetAboutShepinActivity.class);
                startActivity(about);
                break;

        }
    }
}
